#ifndef USEROBJECT_H
#define USEROBJECT_H

#include <QObject>
#include <QString>

class UserObject : public QObject
{
	Q_OBJECT
public:
	UserObject(const QString userName,
			   const QString nickName,
			   const QString headImgUrl,
			   QObject* parent = nullptr)
	  : QObject(parent)
	{
		m_userName = userName; m_nickName = nickName; m_headImgUrl = headImgUrl;
	}

	QString userName() const { return m_userName; }
	void setUserName(const QString & userName)
	{
		m_userName = userName;
		Q_EMIT userNameChanged();
	}

	QString nickName() const { return m_nickName; }
	void setNickName(const QString & nickName)
	{
		m_nickName = nickName;
		Q_EMIT nickNameChanged();
	}

	QString headImgUrl() const { return m_headImgUrl; }
	void setHeadImgUrl(const QString & headImgUrl)
	{
		m_headImgUrl = headImgUrl;
		Q_EMIT headImgUrlChanged();
	}

Q_SIGNALS:
	void userNameChanged();
	void nickNameChanged();
	void headImgUrlChanged();

private:
	QString m_userName;
	QString m_nickName;
	QString m_headImgUrl;
};

#endif // USEROBJECT_H
